<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/1/29
 * Time: 11:10
 */
//协程操作mysql

go(function () {
    $mysql = new \Swoole\Coroutine\MySQL();
    $mysql->connect([
        'host' => '120.78.67.1',
        'port' => 3306,
        'user' => 'root',
        'password' => 'liuqiang',
        'database' => 'swoole',
    ]);
    var_dump($mysql);
});